MacPerl example:




First script: Processor

tell application "MacPerl" return  "You are using a " & (Do Script " #!perl -w use Mac::Gestalt; my($arch, %archs, $mac); $arch= $Gestalt{gestaltSysArchitecture()}; %archs = (gestaltPowerPC() => 'Motorola PowerPC',gestalt68k()=> 'Motorola 68k'); $mac= (defined($archs{$arch}) ? $archs{$arch}: 'an unknown'); MacPerl::Reply($mac); ") & " processor." end tell

Second script: Year 2000

tell application "MacPerl" return  "Days until the year 2000: " & (Do Script " use Time::Local; $d1 = timelocal(0,0,0,1,0,100); $d2 = ($d1 - time()) / 60 / 60 / 24; MacPerl::Reply(int($d2)) ") end tell